UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '656RwZSgLMj6oYaYCRFjhqAIu7vFcN5DBYLl3yTzRbQ=' 
WHERE 
  key_id = '6b2f9de285dcd0b403fee198561783e2e61e26a19cb0d8967965583f2e63a65b' 
  AND (
    token = '656RwZSgLMj6oYaYCRFjhqAIu7vFcN5DBYLl3yTzRbQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029