UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Tb/WvqCJt82AUDL8dkPlg+NYVU4NKvWWnpkfNHPF/oE='
WHERE
key_id = '618f3adb49fad78de7a2f6e042814d147415da0a3f530c70a2702f50b25c3c4f'
AND (
token = 'Tb/WvqCJt82AUDL8dkPlg+NYVU4NKvWWnpkfNHPF/oE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)