UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'z3R4KaFx1a97e7b4psPsu6IAI2UfdKdVVTueu/Z9N5g='
WHERE
key_id = '8992742344713653fc2dd3c0b19bd64761e59d046f80b16aef4146b18701a718'
AND (
token = 'z3R4KaFx1a97e7b4psPsu6IAI2UfdKdVVTueu/Z9N5g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)