UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/UroOI8pUL0OhbQqzDWmSECrQ12IciAisDVMPuGhuiI=' 
WHERE 
  key_id = '0a537fca63a12b4fca65720e87a9f1d82a99ac35dbb74f2ecdf640d393291244' 
  AND (
    token = '/UroOI8pUL0OhbQqzDWmSECrQ12IciAisDVMPuGhuiI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015