UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6Is2neQ7ZX34nvmzz4S3Khdsbyfy//RJmdN5ko6xymM=' 
WHERE 
  key_id = 'b96c1b898a40fd1ec64bee0a3b199befcb73ce61818d3d3eceb79d1152eddbb0' 
  AND (
    token = '6Is2neQ7ZX34nvmzz4S3Khdsbyfy//RJmdN5ko6xymM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019