UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '30V9Th/wtVeh2pwVwt/LwsjA43575DHRx4yKrSG4w2s='
WHERE
key_id = 'b121fda05a92d14b0d693d9ed1757b09f9a99ca6ae33366763bf734c8fd041ab'
AND (
token = '30V9Th/wtVeh2pwVwt/LwsjA43575DHRx4yKrSG4w2s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)