UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UeizvwrFkOimymgYjLTorBJOYDLFAkxHr0ChA71NOZQ='
WHERE
key_id = '910d35bf33492d9b87c5c12b058a76ac346ab117bee852c5d47869e1db629736'
AND (
token = 'UeizvwrFkOimymgYjLTorBJOYDLFAkxHr0ChA71NOZQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)