UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5zxGIqlnXA1zASzcwIw3LwZW73S70aCDBNpr/BE2XIY=' 
WHERE 
  key_id = '5f64605181e5faff0286460ce37a1b5c7de7a5106057bca4a333c047d4f18d13' 
  AND (
    token = '5zxGIqlnXA1zASzcwIw3LwZW73S70aCDBNpr/BE2XIY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040