UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UaCOQsxQ4lq1WNnbx8J71EfJ0LWWQHbPqYmjulnbKIs='
WHERE
key_id = '2361cde790ae2467062ef97db000a54f67a797e26ffa504e0b005ba9b579ef59'
AND (
token = 'UaCOQsxQ4lq1WNnbx8J71EfJ0LWWQHbPqYmjulnbKIs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)