UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zYaUSH2YLVy2rPD6Fyo3cSAfH7iEKcDpf718sYSfZ6s='
WHERE
key_id = '9a13d60fd6fdc03c2f4cf73dbbfa95e779e96e301eadc61cd4b8f366cf7fc524'
AND (
token = 'zYaUSH2YLVy2rPD6Fyo3cSAfH7iEKcDpf718sYSfZ6s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)