UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MILL+ksnoBIrFKcKnSuq1EXUeh/QU/o6L9/D/cdUBTw='
WHERE
key_id = 'eddb273962de799a0f8f1f1978d18f936dba9a72860b746ef05bf30f55bb6d02'
AND (
token = 'MILL+ksnoBIrFKcKnSuq1EXUeh/QU/o6L9/D/cdUBTw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)