UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Kbo2iXYSsH80kbh95KLXjK6gbq3SEHyg4kgF2+4zquc='
WHERE
key_id = 'ea3d4b0cc255f37df88a2eda79b5050b093582a310fc474ad99b19fa5379a367'
AND (
token = 'Kbo2iXYSsH80kbh95KLXjK6gbq3SEHyg4kgF2+4zquc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)