UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VRqj/hP3Gottwr5Fjxh3KA98Kd4avWoBxvKVPBlBHO0=' 
WHERE 
  key_id = '6241df9d5ec10cfbb6c646daf8e1ffbedb9186ff8ba612b19208fecddf654d14' 
  AND (
    token = 'VRqj/hP3Gottwr5Fjxh3KA98Kd4avWoBxvKVPBlBHO0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033