UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KRPgwl4AR3yu/O/i6PUDV64Q5cEhKPFlzY8CGgHGZlw='
WHERE
key_id = '55cffaf403453011228b3b6cac2f66ade1bfd8ee82b779e1c20c29ee55c3f5a0'
AND (
token = 'KRPgwl4AR3yu/O/i6PUDV64Q5cEhKPFlzY8CGgHGZlw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)