UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8BkPyoKWrvtCme7xwCFLXEf3qkgb4AQvKot/57D5ufI=' 
WHERE 
  key_id = '28b31b2cdfceb529ea24bb8f565c7f21dda611613a5a0f0962a27dd9b9dff3f8' 
  AND (
    token = '8BkPyoKWrvtCme7xwCFLXEf3qkgb4AQvKot/57D5ufI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019