UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'n/RNqXTXT/wtfu+QhyW+cYlh1OszdHY28N3TUvbHQ4Y='
WHERE
key_id = '1cac44eb6275a22185a4cb15c7c31c06292bb799fe955c2461bef38cf6febecd'
AND (
token = 'n/RNqXTXT/wtfu+QhyW+cYlh1OszdHY28N3TUvbHQ4Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)