UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hAHZ/VzjYDaMLPPI00oBSc8LqJtKvAd6Crm5j6tUw9Y='
WHERE
key_id = '95080adda0d42b06c0f1b8f2dd5060e5dff52888cfc91c06339d4e8f9c74613d'
AND (
token = 'hAHZ/VzjYDaMLPPI00oBSc8LqJtKvAd6Crm5j6tUw9Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)