UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pLcsWtsYLPzvudusYVv41g5fd+BtbuHWn0tDDAVDgVA='
WHERE
key_id = 'c93b61f2e374281df9fdf6c25db1eaefdff9de93de1c613ad72fd3bc457c9f07'
AND (
token = 'pLcsWtsYLPzvudusYVv41g5fd+BtbuHWn0tDDAVDgVA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)