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

Query time 0.00016