UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QRF1oEH0j0eRnvRkS78s+eO+69zBlLZVAMrsYfSWohg='
WHERE
key_id = '93e5d5f5d161bb1b88e5c642ecf812de692fe021e0ed583f75c0c7bcbea9dffc'
AND (
token = 'QRF1oEH0j0eRnvRkS78s+eO+69zBlLZVAMrsYfSWohg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)