UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'br/75sO7NLvCfFxQi+jknGx/4paPwN+150U5mROux6I=' 
WHERE 
  key_id = 'ae518c9395db6cf670c04839aba44f7349ea76139091e38b13adad5d111983b0' 
  AND (
    token = 'br/75sO7NLvCfFxQi+jknGx/4paPwN+150U5mROux6I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00056