UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qJcAsN7Ln433ZVQROdqLTPNmW7Xl/n/CQpepi1UW4rE='
WHERE
key_id = '1eb3d7fa1124a06e71ed5dd33273d8d0b683f68644ec333ac78dc12eae49025d'
AND (
token = 'qJcAsN7Ln433ZVQROdqLTPNmW7Xl/n/CQpepi1UW4rE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)