UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '46qWDY1ZRS9Q3S9IAUejJXtdkOuWO3HD/PjtKm0qeE8=' 
WHERE 
  key_id = '8b100b70eefae31b243ee836fa50200faa3b93ed665d256695fc124ea2bb3441' 
  AND (
    token = '46qWDY1ZRS9Q3S9IAUejJXtdkOuWO3HD/PjtKm0qeE8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050