UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YYfzuJPuknwvKemzjj3/OClbYGGZa1ZCRcQ2mAZbf7A='
WHERE
key_id = '79b99899271f5f0a4a4764c0f25199ce2cb4b9b521cfb6265af7a6b935a54a06'
AND (
token = 'YYfzuJPuknwvKemzjj3/OClbYGGZa1ZCRcQ2mAZbf7A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)