UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cg3oQXAWoRDLpOPjy2urTEd7csFCK40Cbs3n5WMzjxU='
WHERE
key_id = '750a0abb3006d3f57e7c8b6b73a7b9c4894115e3f2bb84ab8dd5e45bbef628a6'
AND (
token = 'cg3oQXAWoRDLpOPjy2urTEd7csFCK40Cbs3n5WMzjxU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)