UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FJzD4rgayPh8vM6MZp9zMCo4u20+raxsWbbIud/M1H8='
WHERE
key_id = '7199b36d0b2173225593a0e4de63e274ff63ad67f4ce30a7a3c90ddda36d458b'
AND (
token = 'FJzD4rgayPh8vM6MZp9zMCo4u20+raxsWbbIud/M1H8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)