UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UoIN2CNIDg9p2wKuGxRR4vFTtRMK4h7D47K/zQRQdGM='
WHERE
key_id = '64025d1c770fc706351089a4beece68cd5f339f697ec649f01b32e36172d536a'
AND (
token = 'UoIN2CNIDg9p2wKuGxRR4vFTtRMK4h7D47K/zQRQdGM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)