UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HFzk/TafBZrNs2Y75DwDiHliqis14ozj0nhVDdShpJA='
WHERE
key_id = 'aa2b53b461c6bd92b31bc3aaf51897e297cc39679a668ac98146ab4181c6424c'
AND (
token = 'HFzk/TafBZrNs2Y75DwDiHliqis14ozj0nhVDdShpJA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)