UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZwwRjTfEENPyVZlSD6OcxncPHMQmKcnz9ttJ9F8d4AY='
WHERE
key_id = '15054beaabf5d122a4494f8577f42c3af2ed5118f8413097eb391dbfb4acda17'
AND (
token = 'ZwwRjTfEENPyVZlSD6OcxncPHMQmKcnz9ttJ9F8d4AY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)