UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fLFzalmqpN0KxNX/vkzZ9sp7K4IfflhuCrhdwaVwJHs='
WHERE
key_id = '8005db28b54209450b3e4fce2c902c6409ce896a84824a9b1f79092f123156f3'
AND (
token = 'fLFzalmqpN0KxNX/vkzZ9sp7K4IfflhuCrhdwaVwJHs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)