UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YHka3imSifeAiipgU+2hXAXtLUbVuvZTk1CjXUE8tJE='
WHERE
key_id = '17ef707afbc06e4b28bc6d2b45893824f47b528cf1ddbd9d5188928d81a1ced6'
AND (
token = 'YHka3imSifeAiipgU+2hXAXtLUbVuvZTk1CjXUE8tJE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)